package com.rockcent.service.impl;

import com.rockcent.mall.lib.domain.MallFund;
import com.rockcent.mall.lib.domain.enumclass.FundTransactionFlow;
import com.rockcent.mall.lib.domain.enumclass.MallFundFlowTransactionType;
import com.rockcent.mall.lib.domain.enumclass.PaymentMethod;
import com.rockcent.mall.lib.repository.MallFundRepository;
import com.rockcent.service.MallFundSrv;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * Created by zhangjh on 2017/4/5.
 */
@Service
public class MallFundSrvImpl implements MallFundSrv {
    @Autowired
    private MallFundRepository mallFundRepository;

    @Override
    public MallFund findOne(Long mallId) {
        MallFund mallFund = mallFundRepository.findByMallId(mallId);
        mallFund = mallFundRepository.findOne(mallFund.getId());
        return mallFund;
    }

    @Override
    public MallFund save(MallFund mallFund) {
        return mallFundRepository.save(mallFund);
    }

    @Override
    public void save(MallFund mallFund, BigDecimal operationAmount, PaymentMethod baseServicePayments, String seqNo, FundTransactionFlow expend, MallFundFlowTransactionType merchantServiceFeeIncome) {

    }
}
